'use strict';
const db=uniCloud.database()
const userDb=db.collection('topic')
exports.main = async (event, context) => {
	var filter={};
	var arr=Object.keys(event.keyword);
	if(arr.length>0){
		filter={ content:new RegExp(event.keyword)}
	}
	let res=await userDb.where(filter).get();
	// console.log('event: ', res)
	return res
};
